#! /bin/bash
set -e
#set -x

# teco-al编译
source /root/zzx/teco-al/env.sh
bash /root/zzx/teco-al/build.sh -f "conv_forward"

# tecotest编译
cd /root/zzx/teco-al/test/frame_work/tecotest
source /root/zzx/teco-al/test/frame_work/tecotest/env.sh
bash build.sh -f "conv_forward"

# 指定被测试的对象，例如 conv_forward 算子
export LD_LIBRARY_PATH=/zzx/teco-al/build/lib/:$LD_LIBRARY_PATH

# 运行测例，例如使用0号SPA运行cases_dir目录下的所有测例，预热5次，性能取10次结果均值
cd build
python ../tools/unit_test_v2.py --cases_dir=/eco/teco-al/conv_forward/rs_not_1/algo16 --warm_repeat=5 --perf_repeat=10 --gid=0
